package com.jic.manager.mapper;

import com.jic.manager.entity.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.Date;
import java.util.List;

/**
 * 后台用户管理
 * @author : 
 * @email : 
 * @since : 2020-02-25 05:29:32
 * @version : v1.0.0
 */
@Mapper
public interface  SysUserMapper {

    long insert(SysUser sysUser);

    long delete(Long id);

    long update(SysUser sysUser);

    SysUser queryByPrimaryKey(Long id);

    List<SysUser> query(SysUser sysUser);

    List<SysUser> queryPage(@Param("startIndex") int startIndex, @Param("limit") int limit, @Param("sysUser") SysUser sysUser);

    long queryPageCount( @Param("sysUser") SysUser sysUser);

    @Update("update sys_user set status=#{status} where deptid=#{deptId}")
    long updateStatus(@Param("deptId")Long deptId,@Param("status")String status);

    List<String> userPhone(Date date);
}